<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/base.css" />
<link rel="stylesheet" type="text/css" href="css/newassay_edit.css" />
<script src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/tinymce.min.js"></script>
<script type="text/javascript" src="js/jQuery.form.js"></script>
<script type="text/javascript" src="js/plugins/uploadimage/plugin.js"></script>
<script type="text/javascript">
			tinymce.init({
				selector: "textarea#elm1",
				theme: "modern",
				width: '99%',
				height: 300,
				language: "zh_CN",
				upload_image_url: 'personalcenter1212', //配置的上传图片的路由
	            height: 400,
	            plugins: [
	                'advlist autolink autosave lists link image charmap print preview anchor',
	                'searchreplace visualblocks code fullscreen textcolor colorpicker textpattern code uploadimage',
	                'contextmenu paste'
	            ],
	            toolbar1: "undo redo | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | fontselect fontsizeselect ",
	            toolbar2: "forecolor backcolor | bullist numlist | outdent indent | removeformat | link unlink uploadimage | preview fullscreen ",
	            menubar: false,
				
				content_css: "css/content.css",
				style_formats: [{
						title: 'Bold text',
						inline: 'b'
					},
					{
						title: 'Red text',
						inline: 'span',
						styles: {
							color: '#ff0000'
						}
					},
					{
						title: 'Red header',
						block: 'h1',
						styles: {
							color: '#ff0000'
						}
					},
					{
						title: 'Example 1',
						inline: 'span',
						classes: 'example1'
					},
					{
						title: 'Example 2',
						inline: 'span',
						classes: 'example2'
					},
					{
						title: 'Table styles'
					},
					{
						title: 'Table row 1',
						selector: 'tr',
						classes: 'tablerow1'
					},
				],
				 
	              image_advtab: true,
	              templates: [
	                { title: 'Test template 1', content: 'Test 1' },
	                { title: 'Test template 2', content: 'Test 2' }
	              ],
	            menubar: false
			});
		</script>
	
	<script type="text/javascript">
		$(function(){
			$(".submit").click(function(){
				console.log(tinymce.get('elm1').getContent());
			})
		})
	</script>
</head>
<body>
	<div class="blog-title">
		<h4>添加随笔</h4>
	</div>
	<form class="blog-edit" action="blogpost" method="post">
		<div class="edit-title">
			<b>标题</b><br /> <input type="text" class="edittext edit-title-input" name="title"/>
		</div>
		<div class="edit-body">
			<p> 
				<b>内容</b>(TinyMCE编辑器，支持拖放/粘贴上传图片)
			</p>
			<textarea id="elm1" name="content"></textarea>
		</div>
		<div class="edit-type">
			<b>博客分类:</b> <select name="types">
				<option value="1">编程语言</option>
				<option value="2">软件设计</option>
				<option value="3">web前端</option>
				<option value="4">数据库技术</option>
				<option value="5">其他分类</option>
			</select>
		</div>
		<div class="submitgroup">
			<input type="submit" value="发布" class="submit" name="blogpost"/> 
			<input type="submit" value="存草稿" class="submit"  name="blogpost"/>
		</div>
	</form>
</body>
</html>